<template>
    <!-- 风险清单 -->
    <div class="system">
        <ul class="header">
            <li @click="go1">法规标准</li>
            <li class="currentLi">规章制度</li>
            <li @click="go3">操作规程</li>
            <li @click="go4">事故案例</li>
        </ul>
        <ul class="destail"
            v-if="nodata">
            <li v-for="(item,index) in listArr"
                :key="index"
                @click="$router.push({path:'./systemDestail2',query:{type:item.type}})">
                <p><img src="../../../static/images/file_ico.png"
                         alt=""> {{item.categoryName}} </p>
                <x-icon type="ios-arrow-right"
                        size=""
                        class="icon-white"></x-icon>
            </li>
        </ul>
        <!-- <p v-if="!nodata" class="noDestail">暂无数据...</p> -->
        <noData v-if="!listArr.length"></noData>
        <myMenu @clickBack="back"
                backPath='/Index/newEdit'></myMenu>

    </div>
</template>
<script>
import { Datetime, Radio } from 'vux'
import myMenu from '@/commonComponents/menu'
export default {
    components: {
        Radio,
        myMenu,
        Datetime
    },
    data () {
        return {

            name1: '',
            name2: '',
            name3: '',
            parmas: {
                'allowPaging': true,
                'business': 'GetOperateProceduresList',
                'data': {
                    'OperateName': '规章制度'
                },
                'pageIndex': 1,
                'pageSize': 20,
                'tokenId': 'AF0EC33214DA0CE97E2067CC1C4E3A6E',
                'userId': '615123137'
            },
            listArr: [
                {
                    categoryName: '集团文件',
                    type: '111'
                },
                {
                    categoryName: '公司文件',
                    type: '11'
                },
                {
                    categoryName: '分公司文件',
                    type: '12'
                },
                {
                    categoryName: '项目部文件',
                    type: '13'
                }
            ],
            nodata: true
        }
    },
    // created(){
    //     var token =JSON.parse(window.localStorage.getItem('userInfo'))
    //     this.parmas.userId=token.userid
    //     if (window.sessionStorage.getItem('name1')){
    //         this.name1 = window.sessionStorage.getItem('name1')
    //         this.parmas.data.departId=window.sessionStorage.getItem('departId')
    //     }else {
    //         this.name1 = token.deptname
    //         this.parmas.data.departId=token.deptid
    //     }
    //     if (window.sessionStorage.getItem('name2')){
    //         this.name2 = window.sessionStorage.getItem('name2')
    //         this.parmas.data.SourceLevel=window.sessionStorage.getItem('name2')
    //     }
    //     if (JSON.parse(window.sessionStorage.getItem('name3'))){
    //         var name = JSON.parse(window.sessionStorage.getItem('name3'))
    //         var name3=''
    //         for (var k of name){
    //             name3+=k+','
    //             console.log(name3,1990)
    //         }
    //         this.name3 = name3.substring(0,name3.length - 1)
    //         this.parmas.data.AccidentType=this.name3
    //     }
    // },
    mounted () {
        var token = JSON.parse(window.localStorage.getItem('userInfo'))
        this.parmas.userId = token.userid
    },
    methods: {
        back () {
            window.sessionStorage.removeItem('name1')
            window.sessionStorage.removeItem('departId')
            window.sessionStorage.removeItem('name2')
            window.sessionStorage.removeItem('name3')
        },
        go1 () {
            window.sessionStorage.clear()
            this.$router.push('./system')
        },
        go3 () {
            window.sessionStorage.clear()
            this.$router.push('./system3')
        },
        go4 () {
            window.sessionStorage.clear()
            this.$router.push('./system4')
        }
    }
}
</script>
<style lang="less" scope>
.system {
    width: 100%;
    height: 100%;
    font-size: 14px;
    background-color: #ebeef3;
    .header {
        width: 100%;
        height: 60px;
        padding-left: 20px;
        background-color: #fff;
        li {
            width: 64px;
            line-height: 60px;
            height: 60px;
            float: left;
            margin-right: 24px;
            color: #999;
            font-size: 16px;
        }
        .currentLi {
            width: 64px;
            line-height: 60px;
            height: 60px;
            float: left;
            margin-right: 24px;
            color: #2269ff;
            font-size: 16px;
            border-bottom: 4px solid #2269ff;
        }
    }
    .destail {
        width: 100%;
        background-color: #fff;
        margin-top: 10px;
        li {
            width: 100%;
            height: 56px;
            line-height: 56px;
            padding-left: 20px;
            box-sizing: border-box;
            border-bottom: 1px solid #eee;
            p {
                height: 56px;
                line-height: 56px;
                width: 290px;
                float: left;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: 14px;
                color: #333;
                img {
                    width: 30px;
                    height: 30px;
                    border-radius: 50%;
                    float: left;
                    margin-right: 8px;
                    margin-top: 12px;
                }
            }
            .vux-x-icon {
                fill: #999;
                float: right;
                width: 20px;
                height: 20px;
                margin: 16px;
                margin-left: 0 !important;
                margin-right: 4px !important;
            }
        }
    }
    .noDestail {
        background-color: #fff;
        padding: 0 10px;
        height: 50px;
        line-height: 50px;
    }
}
</style>
